package org.gap.domain;

import java.io.Serializable;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class RolesTiersPK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public RolesTiersPK() {
	}

	/**
	 */

	@Column(name = "ROT_ROLE", length = 3, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public String rotRole;
	/**
	 */

	@Column(name = "ROT_TIERS", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer rotTiers;

	/**
	 */
	public void setRotRole(String rotRole) {
		this.rotRole = rotRole;
	}

	/**
	 */
	public String getRotRole() {
		return this.rotRole;
	}

	/**
	 */
	public void setRotTiers(Integer rotTiers) {
		this.rotTiers = rotTiers;
	}

	/**
	 */
	public Integer getRotTiers() {
		return this.rotTiers;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((rotRole == null) ? 0 : rotRole.hashCode()));
		result = (int) (prime * result + ((rotTiers == null) ? 0 : rotTiers.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof RolesTiersPK))
			return false;
		RolesTiersPK equalCheck = (RolesTiersPK) obj;
		if ((rotRole == null && equalCheck.rotRole != null) || (rotRole != null && equalCheck.rotRole == null))
			return false;
		if (rotRole != null && !rotRole.equals(equalCheck.rotRole))
			return false;
		if ((rotTiers == null && equalCheck.rotTiers != null) || (rotTiers != null && equalCheck.rotTiers == null))
			return false;
		if (rotTiers != null && !rotTiers.equals(equalCheck.rotTiers))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("RolesTiersPK");
		sb.append(" rotRole: ").append(getRotRole());
		sb.append(" rotTiers: ").append(getRotTiers());
		return sb.toString();
	}
}
